package com.itcast.dao;

import com.itcast.pojo.OrderSetting;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

public interface OrdersettingDao {
    @Select("select count(*) from health.t_ordersetting where orderDate = #{orderDate}")
    Integer findCount(@Param("orderDate") Date orderDate);
//    @Update("update health.t_ordersetting set number = #{number} where orderDate = #{orderDate}")
    void updateByOrderDate(OrderSetting orderSetting);


    void add(OrderSetting orderSetting);

    @Select("select * from t_ordersetting where orderDate like #{StringDate}")
    List<OrderSetting> findAll(@Param("StringDate") String StringDate);
    @Select("select * from t_ordersetting where orderDate = #{orderDate}")
    OrderSetting findOrderSettingByDate(@Param("orderDate") Date orderDate);
}
